package com.winning.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * @author z_dd@winning.com.cn
 * @date 2019/1/23 10:58
 */
@Service
public class ToKenService {

    @Value("${com.winning.appid}")
    private String appid;

    @Value("${com.winning.secret}")
    private String secret;

    @Value("${com.winning.tokenurl}")
    private String tokenurl;

    @Autowired
    private RestTemplate restTemplate;

    /**
     * 获取Token方法
     *
     * @return java.lang.String
     * @author Administrator
     * @date 2019/1/23
     */
    public String getToken() {
        ResponseEntity<String> restEntity = restTemplate.getForEntity(tokenurl, String.class);
        return "";
    }
}
